// SUGARSCAPE MODEL FOR SWARM
// Based on Nelson Minar's 1996-1997 model; modified by 
// Andre Manoel (andremanoel@gmail.com) with research  
// purposes. See file README for more information.

#import <simtoolsgui.h>
#import <simtoolsgui/GUISwarm.h>
#import <analysis.h> // EZGraph
#import <space.h> // Value2dDisplay, Object2dDisplay
#import "ModelSwarm.h"

// The observer swarm contains all the objects used to instrument a model
@interface ObserverSwarm: GUISwarm
{
  ModelSwarm *modelSwarm;			  // the model being run

  char *parameterFile;
  int displayFrequency;				  // how often to update
  int drawPopulationGraph;			  // flag
  int drawAttributeGraph;			  // flag
  int drawTagGraph;				  // flag
  int drawPriceGraph;				  // flag
  int drawTradesGraph;				  // flag
  int drawPriceStdDevGraph;			  // flag
  int drawQuantGraph;				  // flag
  int drawForesightGraph;			  // flag
  int drawSicknessGraph;			  // flag
  int drawSugarHistogram;			  // flag
  int drawSpiceHistogram;			  // flag
  int drawMrsHistogram;				  // flag
  int drawAgeHistogram;				  // flag

  id <Colormap> colormap;			  // colours
  id <ZoomRaster> worldRaster;			  // window on world
  id <Value2dDisplay> sugarDisplay;		  // sugar displayer
  id <Object2dDisplay> agentDisplay;		  // agent displayer
  id <EZGraph> populationGraph;			  // population graph
  id <EZGraph> attributeGraph;			  // agent attributes graph
  id <EZGraph> tagGraph;			  // cultural tag graph
  id <EZGraph> priceGraph;			  // avg. price graph
  id <EZGraph> tradesGraph;			  // no. of trades graph
  id <EZGraph> priceStdDevGraph;		  // std. dev. in price graph
  id <EZGraph> quantGraph;			  // total quantities graph
  id <EZGraph> foresightGraph;			  // average foresight graph
  id <EZGraph> sicknessGraph;			  // no. of sick people graph
  id <EZBin> sugarHistogram;			  // histogram of sugar
  id <EZBin> spiceHistogram;			  // histogram of spice
  id <EZBin> mrsHistogram;			  // histogram of MRS
  id <EZBin> ageHistogram;			  // histogram of age

  id displayActions;				  // schedule objects
  id displaySchedule;
}

+ createBegin: aZone;
- buildObjects;

- (char*)setParameterFile: (char*)aString;
- saveParameters: (char*)aString;

- buildActions;
- (id <Activity>)activateIn: swarmContext;

@end

